﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using WP8.NavigationFramework.Resources;

namespace WP8.NavigationFramework
{
    public partial class MainPage : PhoneApplicationPage
    {
        public MainPage()
        {
            InitializeComponent();
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
        }

        private void btnRegistrar_Click(object sender, RoutedEventArgs e)
        {
            int nro = 0;
            int.TryParse(this.txtNroRegistros.Text, out nro);
            this.NavigationService.Navigate(new Uri(string.Format("/Views/Registro.xaml?NroRegistros={0}&Fecha={1}", nro, DateTime.Now.ToShortDateString()), UriKind.Relative));
        }
    }
}